package com.easou.ps.dk;

import java.util.List;

import com.easou.ps.dk.domain.QueryInfo;
import com.easou.ps.dk.domain.QueryParams;
import com.easou.ps.dk.services.Emailer;
import com.easou.ps.dk.services.Spider;
import com.easou.ps.dk.services.WatchBaiduInfo;
import com.easou.ps.dk.utils.StatusUtils;

public class MainClass {

	public static void main(String[] args) {
		QueryParams qp = InitConfiger.init();
		
		List<String> wordsList = qp.getQuerys();
		for (int i = 0; i < wordsList.size(); i++) {
			Spider spider = new Spider();
			QueryInfo queryInfo = spider.pass(i,wordsList.get(i),qp,"t");
			qp.putQueryInfo(queryInfo);
		}
		
		//保存当前位置
//		StatusUtils.toSaveTodayStatus(qp);
		System.out.println("=======result print==========");
		
		//统计百度Url匹配的信息
		WatchBaiduInfo.todo(qp);
		
		//计算某天和百度的对比信息
//		Comparer.todo(qp, qp.getBaiduResult());
		
		//比较今天和昨天
//		Comparer.todo(qp, loadFileUtils.toGetYestedayQP());			
		
		//发邮件
		Emailer.todo(qp);
	}
}
